package com.stx.bms.dao;

import com.stx.bms.util.JDBCUtil;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;

public class CallableTest {

    public static void main(String[] args) throws SQLException {

        Connection con = JDBCUtil.getCon();

        CallableStatement st
                = con.prepareCall("{call lys_proc(?,?)}");

        st.setInt(1, 7);
        st.registerOutParameter(2, Types.INTEGER);
        st.execute();

        int result = st.getInt(2);
        System.out.println(result);
    }

}
